package com.webex.ta.hydra.gui;

import com.webex.ta.hydra.core.TestPlan;

/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-9-15
 * Time: 16:07:24
 */
public class ScriptDirtyChecker {
    private TestPlan snapshot;

    public void takeSnapshot() {
        snapshot = GuiPackage.getInstance().getHydraTable().getModel().getTestPlan().clone();
    }

    public boolean isDirty() {
        return !GuiPackage.getInstance().getHydraTable().getModel().getTestPlan().isEqualWith(snapshot);
    }
}
